if (hdelta = 1) and (h = right of me - 1) then put -1 into hdelta
else if (hdelta = -1) and (h = left of me)
then
put 1 into hdelta
end if
if (vdelta = 1) and (v = bottom of me - 1) then put -1 into vdelta
else if (vdelta = -1) and (v = top of me)
then
put 1 into vdelta
end if
SetCursor h+hdelta,v+vdelta
end mouseWithin
-- part 6 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=6 top=299 right=328 bottom=37
-- title width / last selected line: 0
-- icon id / first selected line: 1012 / 1012
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: New Button
----- HyperTalk script -----
on mouseUp
visual effect iris close slow
go card 1
end mouseUp
-- part 7 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=108 top=41 right=93 bottom=508
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Move
-- part 8 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=108 top=98 right=265 bottom=509
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Demo 2
-- part 9 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=108 top=270 right=307 bottom=396
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part contents for card part 7
----- text -----
If you push the button to the left, the cursor will jump to the next demo…
It does this by issuing: SetCursor loc of button "Demo 2"
-- part contents for card part 8
----- text -----
On pushing the button to the left the cursor is freed from the mouse and jumps to the top left corner of this field — try moving the mouse… After a few seconds the cursor will jump to the bottom right of this field, pause again and then return back to the button by issuing a "SetCursor reset".
WARNING: If you abort the button script by typing "Command-." your cursor and mouse will be decoupled! To avoid embarrassment to those of you who are bound to try it, the closeCard handler issues a "SetCursor mouse"
(which does nothing if they are coupled).
-- part contents for card part 9
----- text -----
If you're not yet bored, try leaving the mouse over one of the buttons on the right…